import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  css: {
    modules: {
      generateScopedName: '[name]_[local]_[hash:base64:5]',
      hashPrefix: 'prefix-', // 自定义哈希前缀
    },
    preprocessorOptions: {
      scss: {
        additionalData: `@import "./src/styles/variables.scss";` // 引入全局变量
      },
      less: {
        javascriptEnabled: true
      }
    }
  }
})
